package com.yungee.base.service.impl;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.yungee.base.entity.FileUploadRecord;
import com.yungee.base.entity.JsonHistory;
import com.yungee.base.mapper.FileUploadRecordMapper;
import com.yungee.base.service.FileUploadRecordService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author auto-generate
 * @since 2024-06-22
 */
@Service
@DS("assistant")
public class FileUploadRecordServiceImpl extends ServiceImpl<FileUploadRecordMapper, FileUploadRecord> implements FileUploadRecordService {
    @Autowired
    private FileUploadRecordMapper fileUploadRecordMapper;
    @Override
    public List<FileUploadRecord> getByMd5(String md5Hex) {
        QueryWrapper<FileUploadRecord> query = new QueryWrapper<>();
        query.eq("md5",md5Hex);
        query.eq("status",1);
        return fileUploadRecordMapper.selectList(query);
    }
}
